﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class PurchaseOrderInstallmentBLL
    {
        private static readonly PurchaseOrderInstallmentDAL dal = DataAccess.CreatePurchaseOrderInstallment();

        public PurchaseOrderInstallmentBLL()
        {

        }

        public IList<PurchaseOrderInstallmentInfo> GetPurchaseOrderInstallmentFromParent(int po_seq)
        {
            return dal.GetPurchaseOrderInstallmentFromParent(po_seq);
        }

        public IList<PurchaseOrderInstallmentInfo> GetPurchaseOrderAndInstallmentForDeliveryNote(string search_text)
        {
            return dal.GetPurchaseOrderAndInstallmentForDeliveryNote(search_text);
        }

        public PurchaseOrderInstallmentInfo GetPurchaseOrderInstallmentFromDeliveryNote(int install_seq)
        {
            return dal.GetPurchaseOrderInstallmentFromDeliveryNote(install_seq);
        }

        public PurchaseOrderInstallmentInfo GetPurchaseOrderInstallmentWithDeliveryNote(int dn_seq)
        {
            return dal.GetPurchaseOrderInstallmentWithDeliveryNote(dn_seq);
        }

        public int Insert(PurchaseOrderInstallmentInfo info, IDBManager dbManagerTrans)
        {
            return dal.Insert(info, dbManagerTrans);
        }

        public void Insert(IList<PurchaseOrderInstallmentInfo> infoList)
        {
            dal.Insert(infoList);
        }

        public void Update(IList<PurchaseOrderInstallmentInfo> infoList)
        {
            dal.Update(infoList);
        }
    }
}
